<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<script type="text/javascript" src="../../../js/class/vue.min.js" charset="UTF-8"></script>
	</head>
	<body>
		<style type="text/css">
			.fontRed {
				color: red;
			}
		</style>
		<div id="vue-app">
			<div class="fontRed">ddd</div>
			<div v-bind:class="textColor">{{msg}}</div>
			<button v-on:click="changColor">改变文本颜色</button>
		</div>
		
		<script type="text/javascript">
			"use strict"
			var vm = new Vue({
				el: "#vue-app",
				data: {
					msg:"文本内容",
					textColor:"",
				},
				methods:{
					changColor:function(){
						vm.textColor = "fontRed";
					},
				}
			})
		</script>
	</body>
</html>